<div>
	<div id="a-bigimg">
		<ul>
			<?php $i = 0; foreach ($data['slides'] as $slide):?>
			<li seq="<?=++$i?>">
				<?php
				//print_r($slide);
				?>
				<a href="<?=n_url('page','slide',['sid'=>$slide['id']])?>" target="_blank">
					<img width="754" height="290" src="/page/slide/<?=$slide[img_name]?>">
				</a>
				<span><?=$slide['name']?></span>
			</li>
			<?php endforeach;?>
		</ul>
		<div id="bigimg-tab"></div>
	</div>
	<script>
	$(document).ready(function(){
		var current = 1;
		$("#a-bigimg li").each(function(){
			var seq = $(this).attr("seq")
			$("<a>").text(seq)
					.attr("href","javascript:void(0);")
					.click(function(){
						//alert('yes');
						$("#a-bigimg li").removeClass("show");
						$("#a-bigimg li[seq="+seq+"]").addClass("show");
						$("#bigimg-tab a").removeClass('tab-current')
						$(this).addClass('tab-current');
					})
					.appendTo("#bigimg-tab")
		})
		function next(){

			var seq = $("#bigimg-tab a.tab-current").text();
			if(seq==4){
				seq=0;
			}
			seq++;
			$("#bigimg-tab a").eq(seq-1).click();
			//$("#a-bigimg li[seq="+seq+"] a").click();
			console.log(seq)
		}
		$("#bigimg-tab a").eq(0).click();
		
		//$("#a-bigimg li").eq(0).find("a").click();
		//$(first).find("a").click();

		setInterval(function(){next()},5000)
	});
	</script>

	<div id="ad-button">
		<a href="/index/help.html#jiafang" target="_blank"><span>投</span>点击这里您可以发布广告<br />轻松实现千个百万粉丝公共号同时转发</a>
		<a href="/index/help.html#yifang" target="_blank" style="background-color:#f4f4f4;border-color:#fff;margin-top:52px;">
			<span>接</span>点击这里您可以把公共号的流量转为现金。把粉丝资源变相</a>
	</div>
</div>





<div>
	<dl id="top10" class="n-box" style="width:755px;display:inline-block;vertical-align: top;">
		<dt class="n-box-head">
			<b>TOP公众号</b>
			</dt>
		<dd class="n-box-body">
			<div style="float:left;width:170px;">
				<?php
				foreach($data['cateTree'] as $key=>$val){
				?>
					<div class="cate-list"><?=$key?></div>
					<div class="subcate-list">
				<?php
				foreach ($val as $val1){
				?>
					<a href="<?=n_url('index','index',['cid'=>$val1['sid']])?>" data-id="<?=md5($val1['sname'])?>" class="category_class<?=$val1['sid']==$data['cid']?' cate_current':''?>"><?=$val1['sname']?></a>
				<?php
				}
				?>
					</div>
				<?php
				}
				?>
			</div>
			<div style="margin-left:180px;height:500px;overflow:hidden;">
	
				<?php foreach ($data['weixinLists'] as $category => $weixinList):?>
				<div class="<?=md5($category)?> category">
					<?php foreach ($weixinList as $key => $value):$key++;?>
						<div style="display:inline-block;">
							<a href="<?=n_url('weixin','detail',['wxid'=>$value['wxid']])?>"><img src="<?=get_weixin_face($value['wxid'])?>"></a>
							<div style="margin-top:4px;">
								<a>
									<?=mb_substr($value['wxname'], 0, 8)?><br/>
									<?=substr($value['wxid'], 0, 14)?>
								</a>
							</div>
						</div>

					<?php endforeach;?>
				</div>
				<?php endforeach;?>
			</div>
		</dd>
	</dl>
	<div style="display:inline-block;width:400px;margin-left:40px;">


		<dl class="n-box">
			<dt class="n-box-head">
				<div class="n-right">
					<a class="a-tools" href="<?=n_url('article', 'articlesDaily')?>" target="_blank">更多</a>
				</div>
				<b>热门文章</b>
				</dt>
			<dd class="n-box-body">
				<div id="a-hot-article">
				<?php $count = 1;?>
				<?php foreach($data['hot_articles'] as $article):?>
					<div class="a-bottom-line n-sep-bottom">
						<?php if ($count == 1):?>
							<img src="<?=get_weixin_thumbnail($article['article_mongoid'])?>">
						<?php endif;?>
						
						<div class="seq-<?=$count?>">
							<h3>
								<a href="<?=$article['url']?>" target="_blank"><?=$article['title']?></a>
							</h3>
							<p class="a-summry">
								<?=trim($article['content168'])?>
								<?=date('Y-m-d', $article['article_ptime'])?>
							</p>
						</div>
					</div>
			
				<?php $count++; endforeach;?>
				</div>
			</dd>
		</dl>



		<!--dl class="n-box">
			<dt class="n-box-head">
				<span>加盟</span>
			</dt>
			<dd class="n-box-body" style="padding:10px;">
				加盟即可得到数据分析服务及参与竞价
				
				<button><a href="<?=n_url('union','bind')?>" target="_blank">点我加盟</a></button>
			</dd>
		</dl>

		<dl class="n-box">
			<dt class="n-box-head">
				<span>热词榜</span>
			</dt>
			<dd class="n-box-body">
				暂无
			</dd>
		</dl-->
	</div>
</div>




<div style="margin-top:30px;">
	<a>
		<img src="<?=n_img('index','banner.png')?>" />
	</a>
</div>


<script>
// $(document).ready(function(){
// 	$("#top10 .category").eq(0).show();
// });
// $(".category_class").click(function(){
// 	$("#top10 .category").hide();
// 	$("."+$(this).attr('data-id')).show();
// });
</script>